package com.lagou.advice;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class MyAdvice {

    @Pointcut("execution( * com.lagou.service.impl.ArticleServiceImpl.*(..))")
    public void myPoint(){}

    @Before("myPoint()")
    public void before(){
        System.out.println("前置通知执行了");
    }
}
